 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKPod/PodModel.h>

@implementation ContainerStateWaiting
-(id) initWithReason:(NSString*) reason
      message:(NSString*)message { 
     self.reason = reason;               
     self.message = message;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self reason])
    {
        [result setValue:[self reason] forKey:@"reason"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.reason = [dictionary objectForKey:@"reason"];
    self.message = [dictionary objectForKey:@"message"];
    return self;
}
 @end
@implementation SecurityGroupSimple
-(id) initWithGroupId:(NSString*) groupId
      groupName:(NSString*)groupName { 
     self.groupId = groupId;               
     self.groupName = groupName;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self groupId])
    {
        [result setValue:[self groupId] forKey:@"groupId"];
    }
    if([self groupName])
    {
        [result setValue:[self groupName] forKey:@"groupName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.groupId = [dictionary objectForKey:@"groupId"];
    self.groupName = [dictionary objectForKey:@"groupName"];
    return self;
}
 @end
@implementation Request
-(id) initWithCpu:(NSString*) cpu
      memoryMB:(NSString*)memoryMB { 
     self.cpu = cpu;               
     self.memoryMB = memoryMB;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self cpu])
    {
        [result setValue:[self cpu] forKey:@"cpu"];
    }
    if([self memoryMB])
    {
        [result setValue:[self memoryMB] forKey:@"memoryMB"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cpu = [dictionary objectForKey:@"cpu"];
    self.memoryMB = [dictionary objectForKey:@"memoryMB"];
    return self;
}
 @end
@implementation RequestSpec
-(id) initWithCpu:(NSString*) cpu
      memoryMB:(NSString*)memoryMB { 
     self.cpu = cpu;               
     self.memoryMB = memoryMB;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self cpu])
    {
        [result setValue:[self cpu] forKey:@"cpu"];
    }
    if([self memoryMB])
    {
        [result setValue:[self memoryMB] forKey:@"memoryMB"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cpu = [dictionary objectForKey:@"cpu"];
    self.memoryMB = [dictionary objectForKey:@"memoryMB"];
    return self;
}
 @end
@implementation LogConfigSpec
-(id) initWithLogDriver:(NSString*) logDriver { 
     self.logDriver = logDriver;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self logDriver])
    {
        [result setValue:[self logDriver] forKey:@"logDriver"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.logDriver = [dictionary objectForKey:@"logDriver"];
    return self;
}
 @end
@implementation Logs
-(id) initWithContent:(NSString*) content { 
     self.content = content;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self content])
    {
        [result setValue:[self content] forKey:@"content"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.content = [dictionary objectForKey:@"content"];
    return self;
}
 @end
@implementation Exec
-(id) initWithCommand:(NSArray<NSString*>*) command { 
     self.command = command;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self command])
    {
        [result setValue:[self command] forKey:@"command"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.command = [dictionary objectForKey:@"command"];
    return self;
}
 @end
@implementation HostAlias
-(id) initWithHostnames:(NSArray<NSString*>*) hostnames
      ip:(NSString*)ip { 
     self.hostnames = hostnames;               
     self.ip = ip;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self hostnames])
    {
        [result setValue:[self hostnames] forKey:@"hostnames"];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.hostnames = [dictionary objectForKey:@"hostnames"];
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
}
 @end
@implementation VolumeMount
-(id) initWithName:(NSString*) name
      mountPath:(NSString*)mountPath
      readOnly:(NSNumber*)readOnly { 
     self.name = name;               
     self.mountPath = mountPath;               
     self.readOnly = readOnly;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self mountPath])
    {
        [result setValue:[self mountPath] forKey:@"mountPath"];
    }
    if([self readOnly])
    {
        [result setValue:[self readOnly] forKey:@"readOnly"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.mountPath = [dictionary objectForKey:@"mountPath"];
    self.readOnly = [dictionary objectForKey:@"readOnly"];
    return self;
}
 @end
@implementation PodQuota
-(id) initWithResourceType:(NSString*) resourceType
      limit:(NSNumber*)limit
      used:(NSNumber*)used { 
     self.resourceType = resourceType;               
     self.limit = limit;               
     self.used = used;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceType])
    {
        [result setValue:[self resourceType] forKey:@"resourceType"];
    }
    if([self limit])
    {
        [result setValue:[self limit] forKey:@"limit"];
    }
    if([self used])
    {
        [result setValue:[self used] forKey:@"used"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceType = [dictionary objectForKey:@"resourceType"];
    self.limit = [dictionary objectForKey:@"limit"];
    self.used = [dictionary objectForKey:@"used"];
    return self;
}
 @end
@implementation NetworkInterfacePrivateIp
-(id) initWithPrivateIpAddress:(NSString*) privateIpAddress
      elasticIpId:(NSString*)elasticIpId
      elasticIpAddress:(NSString*)elasticIpAddress { 
     self.privateIpAddress = privateIpAddress;               
     self.elasticIpId = elasticIpId;               
     self.elasticIpAddress = elasticIpAddress;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self privateIpAddress])
    {
        [result setValue:[self privateIpAddress] forKey:@"privateIpAddress"];
    }
    if([self elasticIpId])
    {
        [result setValue:[self elasticIpId] forKey:@"elasticIpId"];
    }
    if([self elasticIpAddress])
    {
        [result setValue:[self elasticIpAddress] forKey:@"elasticIpAddress"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.privateIpAddress = [dictionary objectForKey:@"privateIpAddress"];
    self.elasticIpId = [dictionary objectForKey:@"elasticIpId"];
    self.elasticIpAddress = [dictionary objectForKey:@"elasticIpAddress"];
    return self;
}
 @end
@implementation InstanceTypeState
-(id) initWithAz:(NSString*) az
      inStock:(NSNumber*)inStock
      online:(NSNumber*)online { 
     self.az = az;               
     self.inStock = inStock;               
     self.online = online;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self az])
    {
        [result setValue:[self az] forKey:@"az"];
    }
    if([self inStock])
    {
        [result setValue:[self inStock] forKey:@"inStock"];
    }
    if([self online])
    {
        [result setValue:[self online] forKey:@"online"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.az = [dictionary objectForKey:@"az"];
    self.inStock = [dictionary objectForKey:@"inStock"];
    self.online = [dictionary objectForKey:@"online"];
    return self;
}
 @end
@implementation PodDnsConfigOptionSpec
-(id) initWithName:(NSString*) name
      value:(NSString*)value { 
     self.name = name;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation JDCloudVolumeSource
-(id) initWithVolumeId:(NSString*) volumeId
      snapshotId:(NSString*)snapshotId
      diskType:(NSString*)diskType
      sizeGB:(NSNumber*)sizeGB
      fsType:(NSString*)fsType
      formatVolume:(NSNumber*)formatVolume
      iops:(NSNumber*)iops
      autoDelete:(NSNumber*)autoDelete { 
     self.volumeId = volumeId;               
     self.snapshotId = snapshotId;               
     self.diskType = diskType;               
     self.sizeGB = sizeGB;               
     self.fsType = fsType;               
     self.formatVolume = formatVolume;               
     self.iops = iops;               
     self.autoDelete = autoDelete;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self volumeId])
    {
        [result setValue:[self volumeId] forKey:@"volumeId"];
    }
    if([self snapshotId])
    {
        [result setValue:[self snapshotId] forKey:@"snapshotId"];
    }
    if([self diskType])
    {
        [result setValue:[self diskType] forKey:@"diskType"];
    }
    if([self sizeGB])
    {
        [result setValue:[self sizeGB] forKey:@"sizeGB"];
    }
    if([self fsType])
    {
        [result setValue:[self fsType] forKey:@"fsType"];
    }
    if([self formatVolume])
    {
        [result setValue:[self formatVolume] forKey:@"formatVolume"];
    }
    if([self iops])
    {
        [result setValue:[self iops] forKey:@"iops"];
    }
    if([self autoDelete])
    {
        [result setValue:[self autoDelete] forKey:@"autoDelete"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.volumeId = [dictionary objectForKey:@"volumeId"];
    self.snapshotId = [dictionary objectForKey:@"snapshotId"];
    self.diskType = [dictionary objectForKey:@"diskType"];
    self.sizeGB = [dictionary objectForKey:@"sizeGB"];
    self.fsType = [dictionary objectForKey:@"fsType"];
    self.formatVolume = [dictionary objectForKey:@"formatVolume"];
    self.iops = [dictionary objectForKey:@"iops"];
    self.autoDelete = [dictionary objectForKey:@"autoDelete"];
    return self;
}
 @end
@implementation CloudDiskSpec
-(id) initWithVolumeId:(NSString*) volumeId
      name:(NSString*)name
      snapshotId:(NSString*)snapshotId
      diskType:(NSString*)diskType
      sizeGB:(NSNumber*)sizeGB
      fsType:(NSString*)fsType
      iops:(NSNumber*)iops
      autoDelete:(NSNumber*)autoDelete { 
     self.volumeId = volumeId;               
     self.name = name;               
     self.snapshotId = snapshotId;               
     self.diskType = diskType;               
     self.sizeGB = sizeGB;               
     self.fsType = fsType;               
     self.iops = iops;               
     self.autoDelete = autoDelete;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self volumeId])
    {
        [result setValue:[self volumeId] forKey:@"volumeId"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self snapshotId])
    {
        [result setValue:[self snapshotId] forKey:@"snapshotId"];
    }
    if([self diskType])
    {
        [result setValue:[self diskType] forKey:@"diskType"];
    }
    if([self sizeGB])
    {
        [result setValue:[self sizeGB] forKey:@"sizeGB"];
    }
    if([self fsType])
    {
        [result setValue:[self fsType] forKey:@"fsType"];
    }
    if([self iops])
    {
        [result setValue:[self iops] forKey:@"iops"];
    }
    if([self autoDelete])
    {
        [result setValue:[self autoDelete] forKey:@"autoDelete"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.volumeId = [dictionary objectForKey:@"volumeId"];
    self.name = [dictionary objectForKey:@"name"];
    self.snapshotId = [dictionary objectForKey:@"snapshotId"];
    self.diskType = [dictionary objectForKey:@"diskType"];
    self.sizeGB = [dictionary objectForKey:@"sizeGB"];
    self.fsType = [dictionary objectForKey:@"fsType"];
    self.iops = [dictionary objectForKey:@"iops"];
    self.autoDelete = [dictionary objectForKey:@"autoDelete"];
    return self;
}
 @end
@implementation PodCondition
-(id) initWithLastProbeTime:(NSString*) lastProbeTime
      lastTransitionTime:(NSString*)lastTransitionTime
      reason:(NSString*)reason
      status:(NSString*)status
      message:(NSString*)message
      conditionType:(NSString*)conditionType { 
     self.lastProbeTime = lastProbeTime;               
     self.lastTransitionTime = lastTransitionTime;               
     self.reason = reason;               
     self.status = status;               
     self.message = message;               
     self.conditionType = conditionType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self lastProbeTime])
    {
        [result setValue:[self lastProbeTime] forKey:@"lastProbeTime"];
    }
    if([self lastTransitionTime])
    {
        [result setValue:[self lastTransitionTime] forKey:@"lastTransitionTime"];
    }
    if([self reason])
    {
        [result setValue:[self reason] forKey:@"reason"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    if([self conditionType])
    {
        [result setValue:[self conditionType] forKey:@"conditionType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.lastProbeTime = [dictionary objectForKey:@"lastProbeTime"];
    self.lastTransitionTime = [dictionary objectForKey:@"lastTransitionTime"];
    self.reason = [dictionary objectForKey:@"reason"];
    self.status = [dictionary objectForKey:@"status"];
    self.message = [dictionary objectForKey:@"message"];
    self.conditionType = [dictionary objectForKey:@"conditionType"];
    return self;
}
 @end
@implementation BindInfo
-(id) initWithResourceId:(NSString*) resourceId
      resourceName:(NSString*)resourceName
      remark:(NSString*)remark { 
     self.resourceId = resourceId;               
     self.resourceName = resourceName;               
     self.remark = remark;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self resourceName])
    {
        [result setValue:[self resourceName] forKey:@"resourceName"];
    }
    if([self remark])
    {
        [result setValue:[self remark] forKey:@"remark"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.resourceName = [dictionary objectForKey:@"resourceName"];
    self.remark = [dictionary objectForKey:@"remark"];
    return self;
}
 @end
@implementation TcpSocket
-(id) initWithPort:(NSNumber*) port { 
     self.port = port;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.port = [dictionary objectForKey:@"port"];
    return self;
}
 @end
@implementation ContainerStateTerminated
-(id) initWithSignal:(NSNumber*) signal
      exitCode:(NSNumber*)exitCode
      reason:(NSString*)reason
      message:(NSString*)message
      finishedAt:(NSString*)finishedAt
      startedAt:(NSString*)startedAt { 
     self.signal = signal;               
     self.exitCode = exitCode;               
     self.reason = reason;               
     self.message = message;               
     self.finishedAt = finishedAt;               
     self.startedAt = startedAt;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self signal])
    {
        [result setValue:[self signal] forKey:@"signal"];
    }
    if([self exitCode])
    {
        [result setValue:[self exitCode] forKey:@"exitCode"];
    }
    if([self reason])
    {
        [result setValue:[self reason] forKey:@"reason"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    if([self finishedAt])
    {
        [result setValue:[self finishedAt] forKey:@"finishedAt"];
    }
    if([self startedAt])
    {
        [result setValue:[self startedAt] forKey:@"startedAt"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.signal = [dictionary objectForKey:@"signal"];
    self.exitCode = [dictionary objectForKey:@"exitCode"];
    self.reason = [dictionary objectForKey:@"reason"];
    self.message = [dictionary objectForKey:@"message"];
    self.finishedAt = [dictionary objectForKey:@"finishedAt"];
    self.startedAt = [dictionary objectForKey:@"startedAt"];
    return self;
}
 @end
@implementation PodTagFilter
-(id) initWithKey:(NSString*) key
      values:(NSArray<NSString*>*)values { 
     self.key = key;               
     self.values = values;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self values])
    {
        [result setValue:[self values] forKey:@"values"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.key = [dictionary objectForKey:@"key"];
    self.values = [dictionary objectForKey:@"values"];
    return self;
}
 @end
@implementation ElasticIp
-(id) initWithElasticIpId:(NSString*) elasticIpId
      elasticIpAddress:(NSString*)elasticIpAddress { 
     self.elasticIpId = elasticIpId;               
     self.elasticIpAddress = elasticIpAddress;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self elasticIpId])
    {
        [result setValue:[self elasticIpId] forKey:@"elasticIpId"];
    }
    if([self elasticIpAddress])
    {
        [result setValue:[self elasticIpAddress] forKey:@"elasticIpAddress"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.elasticIpId = [dictionary objectForKey:@"elasticIpId"];
    self.elasticIpAddress = [dictionary objectForKey:@"elasticIpAddress"];
    return self;
}
 @end
@implementation CloudDisk
-(id) initWithVolumeId:(NSString*) volumeId
      snapshotId:(NSString*)snapshotId
      diskType:(NSString*)diskType
      sizeGB:(NSNumber*)sizeGB
      fsType:(NSString*)fsType
      iops:(NSNumber*)iops
      autoDelete:(NSNumber*)autoDelete { 
     self.volumeId = volumeId;               
     self.snapshotId = snapshotId;               
     self.diskType = diskType;               
     self.sizeGB = sizeGB;               
     self.fsType = fsType;               
     self.iops = iops;               
     self.autoDelete = autoDelete;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self volumeId])
    {
        [result setValue:[self volumeId] forKey:@"volumeId"];
    }
    if([self snapshotId])
    {
        [result setValue:[self snapshotId] forKey:@"snapshotId"];
    }
    if([self diskType])
    {
        [result setValue:[self diskType] forKey:@"diskType"];
    }
    if([self sizeGB])
    {
        [result setValue:[self sizeGB] forKey:@"sizeGB"];
    }
    if([self fsType])
    {
        [result setValue:[self fsType] forKey:@"fsType"];
    }
    if([self iops])
    {
        [result setValue:[self iops] forKey:@"iops"];
    }
    if([self autoDelete])
    {
        [result setValue:[self autoDelete] forKey:@"autoDelete"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.volumeId = [dictionary objectForKey:@"volumeId"];
    self.snapshotId = [dictionary objectForKey:@"snapshotId"];
    self.diskType = [dictionary objectForKey:@"diskType"];
    self.sizeGB = [dictionary objectForKey:@"sizeGB"];
    self.fsType = [dictionary objectForKey:@"fsType"];
    self.iops = [dictionary objectForKey:@"iops"];
    self.autoDelete = [dictionary objectForKey:@"autoDelete"];
    return self;
}
 @end
@implementation Env
-(id) initWithName:(NSString*) name
      value:(NSString*)value { 
     self.name = name;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation ExecSpec
-(id) initWithCommand:(NSArray<NSString*>*) command { 
     self.command = command;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self command])
    {
        [result setValue:[self command] forKey:@"command"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.command = [dictionary objectForKey:@"command"];
    return self;
}
 @end
@implementation JDCloudVolumeSourceSpec
-(id) initWithVolumeId:(NSString*) volumeId
      name:(NSString*)name
      snapshotId:(NSString*)snapshotId
      diskType:(NSString*)diskType
      sizeGB:(NSNumber*)sizeGB
      fsType:(NSString*)fsType
      formatVolume:(NSNumber*)formatVolume
      iops:(NSNumber*)iops
      autoDelete:(NSNumber*)autoDelete { 
     self.volumeId = volumeId;               
     self.name = name;               
     self.snapshotId = snapshotId;               
     self.diskType = diskType;               
     self.sizeGB = sizeGB;               
     self.fsType = fsType;               
     self.formatVolume = formatVolume;               
     self.iops = iops;               
     self.autoDelete = autoDelete;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self volumeId])
    {
        [result setValue:[self volumeId] forKey:@"volumeId"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self snapshotId])
    {
        [result setValue:[self snapshotId] forKey:@"snapshotId"];
    }
    if([self diskType])
    {
        [result setValue:[self diskType] forKey:@"diskType"];
    }
    if([self sizeGB])
    {
        [result setValue:[self sizeGB] forKey:@"sizeGB"];
    }
    if([self fsType])
    {
        [result setValue:[self fsType] forKey:@"fsType"];
    }
    if([self formatVolume])
    {
        [result setValue:[self formatVolume] forKey:@"formatVolume"];
    }
    if([self iops])
    {
        [result setValue:[self iops] forKey:@"iops"];
    }
    if([self autoDelete])
    {
        [result setValue:[self autoDelete] forKey:@"autoDelete"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.volumeId = [dictionary objectForKey:@"volumeId"];
    self.name = [dictionary objectForKey:@"name"];
    self.snapshotId = [dictionary objectForKey:@"snapshotId"];
    self.diskType = [dictionary objectForKey:@"diskType"];
    self.sizeGB = [dictionary objectForKey:@"sizeGB"];
    self.fsType = [dictionary objectForKey:@"fsType"];
    self.formatVolume = [dictionary objectForKey:@"formatVolume"];
    self.iops = [dictionary objectForKey:@"iops"];
    self.autoDelete = [dictionary objectForKey:@"autoDelete"];
    return self;
}
 @end
@implementation TcpSocketSpec
-(id) initWithPort:(NSNumber*) port { 
     self.port = port;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.port = [dictionary objectForKey:@"port"];
    return self;
}
 @end
@implementation HostAliasSpec
-(id) initWithHostnames:(NSArray<NSString*>*) hostnames
      ip:(NSString*)ip { 
     self.hostnames = hostnames;               
     self.ip = ip;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self hostnames])
    {
        [result setValue:[self hostnames] forKey:@"hostnames"];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.hostnames = [dictionary objectForKey:@"hostnames"];
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
}
 @end
@implementation EnvSpec
-(id) initWithName:(NSString*) name
      value:(NSString*)value { 
     self.name = name;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation VolumeMountSpec
-(id) initWithName:(NSString*) name
      mountPath:(NSString*)mountPath
      readOnly:(NSNumber*)readOnly { 
     self.name = name;               
     self.mountPath = mountPath;               
     self.readOnly = readOnly;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self mountPath])
    {
        [result setValue:[self mountPath] forKey:@"mountPath"];
    }
    if([self readOnly])
    {
        [result setValue:[self readOnly] forKey:@"readOnly"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.mountPath = [dictionary objectForKey:@"mountPath"];
    self.readOnly = [dictionary objectForKey:@"readOnly"];
    return self;
}
 @end
@implementation HhSpec
-(id) initWithName:(NSString*) name
      value:(NSString*)value { 
     self.name = name;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation PodDnsConfigOption
-(id) initWithName:(NSString*) name
      value:(NSString*)value { 
     self.name = name;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation Hh
-(id) initWithName:(NSString*) name
      value:(NSString*)value { 
     self.name = name;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation Tag
-(id) initWithKey:(NSString*) key
      value:(NSString*)value { 
     self.key = key;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.key = [dictionary objectForKey:@"key"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation DockerRegistryData
-(id) initWithServer:(NSString*) server
      username:(NSString*)username
      password:(NSString*)password
      email:(NSString*)email { 
     self.server = server;               
     self.username = username;               
     self.password = password;               
     self.email = email;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self server])
    {
        [result setValue:[self server] forKey:@"server"];
    }
    if([self username])
    {
        [result setValue:[self username] forKey:@"username"];
    }
    if([self password])
    {
        [result setValue:[self password] forKey:@"password"];
    }
    if([self email])
    {
        [result setValue:[self email] forKey:@"email"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.server = [dictionary objectForKey:@"server"];
    self.username = [dictionary objectForKey:@"username"];
    self.password = [dictionary objectForKey:@"password"];
    self.email = [dictionary objectForKey:@"email"];
    return self;
}
 @end
@implementation ContainerStateRunning
-(id) initWithStartedAt:(NSString*) startedAt { 
     self.startedAt = startedAt;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self startedAt])
    {
        [result setValue:[self startedAt] forKey:@"startedAt"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.startedAt = [dictionary objectForKey:@"startedAt"];
    return self;
}
 @end
@implementation LogConfig
-(id) initWithLogDriver:(NSString*) logDriver { 
     self.logDriver = logDriver;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self logDriver])
    {
        [result setValue:[self logDriver] forKey:@"logDriver"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.logDriver = [dictionary objectForKey:@"logDriver"];
    return self;
}
 @end
@implementation ResourceRequests
-(id) initWithRequests:(Request*) requests
      limits:(Request*)limits { 
     self.requests = requests;               
     self.limits = limits;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self requests])
    {
        [result setValue:[[self requests] dictionary]forKey:@"requests"];
    }
    if([self limits])
    {
        [result setValue:[[self limits] dictionary]forKey:@"limits"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.requests = [[Request alloc]initWithDic:[dictionary objectForKey:@"requests"]];
    self.limits = [[Request alloc]initWithDic:[dictionary objectForKey:@"limits"]];
    return self;
}
 @end
@implementation ResourceRequestsSpec
-(id) initWithRequests:(RequestSpec*) requests
      limits:(RequestSpec*)limits { 
     self.requests = requests;               
     self.limits = limits;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self requests])
    {
        [result setValue:[[self requests] dictionary]forKey:@"requests"];
    }
    if([self limits])
    {
        [result setValue:[[self limits] dictionary]forKey:@"limits"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.requests = [[RequestSpec alloc]initWithDic:[dictionary objectForKey:@"requests"]];
    self.limits = [[RequestSpec alloc]initWithDic:[dictionary objectForKey:@"limits"]];
    return self;
}
 @end
@implementation InstanceNetworkInterface
-(id) initWithNetworkInterfaceId:(NSString*) networkInterfaceId
      macAddress:(NSString*)macAddress
      vpcId:(NSString*)vpcId
      subnetId:(NSString*)subnetId
      descriptionValue:(NSString*)descriptionValue
      securityGroups:(NSArray<SecurityGroupSimple*>*)securityGroups
      sanityCheck:(NSNumber*)sanityCheck
      primaryIp:(NetworkInterfacePrivateIp*)primaryIp
      secondaryIps:(NSArray<NetworkInterfacePrivateIp*>*)secondaryIps { 
     self.networkInterfaceId = networkInterfaceId;               
     self.macAddress = macAddress;               
     self.vpcId = vpcId;               
     self.subnetId = subnetId;               
     self.descriptionValue = descriptionValue;               
     self.securityGroups = securityGroups;               
     self.sanityCheck = sanityCheck;               
     self.primaryIp = primaryIp;               
     self.secondaryIps = secondaryIps;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self networkInterfaceId])
    {
        [result setValue:[self networkInterfaceId] forKey:@"networkInterfaceId"];
    }
    if([self macAddress])
    {
        [result setValue:[self macAddress] forKey:@"macAddress"];
    }
    if([self vpcId])
    {
        [result setValue:[self vpcId] forKey:@"vpcId"];
    }
    if([self subnetId])
    {
        [result setValue:[self subnetId] forKey:@"subnetId"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self securityGroups])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self securityGroups] count]; i++) {
            SecurityGroupSimple* item = [[self securityGroups] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"securityGroups"];
    }
    if([self sanityCheck])
    {
        [result setValue:[self sanityCheck] forKey:@"sanityCheck"];
    }
    if([self primaryIp])
    {
        [result setValue:[[self primaryIp] dictionary]forKey:@"primaryIp"];
    }
    if([self secondaryIps])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self secondaryIps] count]; i++) {
            NetworkInterfacePrivateIp* item = [[self secondaryIps] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"secondaryIps"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.networkInterfaceId = [dictionary objectForKey:@"networkInterfaceId"];
    self.macAddress = [dictionary objectForKey:@"macAddress"];
    self.vpcId = [dictionary objectForKey:@"vpcId"];
    self.subnetId = [dictionary objectForKey:@"subnetId"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    NSArray* securityGroupsArray = [dictionary objectForKey:@"securityGroups"];
    if(securityGroupsArray&&![securityGroupsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [securityGroupsArray count];i++)
        {
            SecurityGroupSimple* item = [[SecurityGroupSimple alloc]initWithDic:[securityGroupsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.securityGroups = propertyArray;
    }
    self.sanityCheck = [dictionary objectForKey:@"sanityCheck"];
    self.primaryIp = [[NetworkInterfacePrivateIp alloc]initWithDic:[dictionary objectForKey:@"primaryIp"]];
    NSArray* secondaryIpsArray = [dictionary objectForKey:@"secondaryIps"];
    if(secondaryIpsArray&&![secondaryIpsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [secondaryIpsArray count];i++)
        {
            NetworkInterfacePrivateIp* item = [[NetworkInterfacePrivateIp alloc]initWithDic:[secondaryIpsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.secondaryIps = propertyArray;
    }
    return self;
}
 @end
@implementation InstanceType
-(id) initWithFamily:(NSString*) family
      instanceTypeValue:(NSString*)instanceTypeValue
      cpu:(NSNumber*)cpu
      memoryMB:(NSNumber*)memoryMB
      nicLimit:(NSNumber*)nicLimit
      desc:(NSString*)desc
      state:(NSArray<InstanceTypeState*>*)state { 
     self.family = family;               
     self.instanceTypeValue = instanceTypeValue;               
     self.cpu = cpu;               
     self.memoryMB = memoryMB;               
     self.nicLimit = nicLimit;               
     self.desc = desc;               
     self.state = state;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self family])
    {
        [result setValue:[self family] forKey:@"family"];
    }
    if([self instanceTypeValue])
    {
        [result setValue:[self instanceTypeValue] forKey:@"instanceType"];
    }
    if([self cpu])
    {
        [result setValue:[self cpu] forKey:@"cpu"];
    }
    if([self memoryMB])
    {
        [result setValue:[self memoryMB] forKey:@"memoryMB"];
    }
    if([self nicLimit])
    {
        [result setValue:[self nicLimit] forKey:@"nicLimit"];
    }
    if([self desc])
    {
        [result setValue:[self desc] forKey:@"desc"];
    }
    if([self state])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self state] count]; i++) {
            InstanceTypeState* item = [[self state] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"state"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.family = [dictionary objectForKey:@"family"];
    self.instanceTypeValue = [dictionary objectForKey:@"instanceType"];
    self.cpu = [dictionary objectForKey:@"cpu"];
    self.memoryMB = [dictionary objectForKey:@"memoryMB"];
    self.nicLimit = [dictionary objectForKey:@"nicLimit"];
    self.desc = [dictionary objectForKey:@"desc"];
    NSArray* stateArray = [dictionary objectForKey:@"state"];
    if(stateArray&&![stateArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [stateArray count];i++)
        {
            InstanceTypeState* item = [[InstanceTypeState alloc]initWithDic:[stateArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.state = propertyArray;
    }
    return self;
}
 @end
@implementation Volume
-(id) initWithName:(NSString*) name
      jdcloudDisk:(JDCloudVolumeSource*)jdcloudDisk { 
     self.name = name;               
     self.jdcloudDisk = jdcloudDisk;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self jdcloudDisk])
    {
        [result setValue:[[self jdcloudDisk] dictionary]forKey:@"jdcloudDisk"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.jdcloudDisk = [[JDCloudVolumeSource alloc]initWithDic:[dictionary objectForKey:@"jdcloudDisk"]];
    return self;
}
 @end
@implementation InstanceInfo
-(id) initWithResourceId:(NSString*) resourceId
      resourceName:(NSString*)resourceName
      remark:(NSString*)remark
      bind:(NSArray<BindInfo*>*)bind { 
     self.resourceId = resourceId;               
     self.resourceName = resourceName;               
     self.remark = remark;               
     self.bind = bind;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self resourceName])
    {
        [result setValue:[self resourceName] forKey:@"resourceName"];
    }
    if([self remark])
    {
        [result setValue:[self remark] forKey:@"remark"];
    }
    if([self bind])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self bind] count]; i++) {
            BindInfo* item = [[self bind] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"bind"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.resourceName = [dictionary objectForKey:@"resourceName"];
    self.remark = [dictionary objectForKey:@"remark"];
    NSArray* bindArray = [dictionary objectForKey:@"bind"];
    if(bindArray&&![bindArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [bindArray count];i++)
        {
            BindInfo* item = [[BindInfo alloc]initWithDic:[bindArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.bind = propertyArray;
    }
    return self;
}
 @end
@implementation DnsConfigSpec
-(id) initWithNameservers:(NSArray<NSString*>*) nameservers
      searches:(NSArray<NSString*>*)searches
      options:(NSArray<PodDnsConfigOptionSpec*>*)options { 
     self.nameservers = nameservers;               
     self.searches = searches;               
     self.options = options;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self nameservers])
    {
        [result setValue:[self nameservers] forKey:@"nameservers"];
    }
    if([self searches])
    {
        [result setValue:[self searches] forKey:@"searches"];
    }
    if([self options])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self options] count]; i++) {
            PodDnsConfigOptionSpec* item = [[self options] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"options"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.nameservers = [dictionary objectForKey:@"nameservers"];
    self.searches = [dictionary objectForKey:@"searches"];
    NSArray* optionsArray = [dictionary objectForKey:@"options"];
    if(optionsArray&&![optionsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [optionsArray count];i++)
        {
            PodDnsConfigOptionSpec* item = [[PodDnsConfigOptionSpec alloc]initWithDic:[optionsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.options = propertyArray;
    }
    return self;
}
 @end
@implementation NetworkInterfaceAttachmentSpec
-(id) initWithAutoDelete:(NSNumber*) autoDelete
      deviceIndex:(NSNumber*)deviceIndex
      networkInterface:(NetworkInterfaceSpec*)networkInterface { 
     self.autoDelete = autoDelete;               
     self.deviceIndex = deviceIndex;               
     self.networkInterface = networkInterface;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self autoDelete])
    {
        [result setValue:[self autoDelete] forKey:@"autoDelete"];
    }
    if([self deviceIndex])
    {
        [result setValue:[self deviceIndex] forKey:@"deviceIndex"];
    }
    if([self networkInterface])
    {
        [result setValue:[[self networkInterface] dictionary]forKey:@"networkInterface"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.autoDelete = [dictionary objectForKey:@"autoDelete"];
    self.deviceIndex = [dictionary objectForKey:@"deviceIndex"];
    self.networkInterface = [[NetworkInterfaceSpec alloc]initWithDic:[dictionary objectForKey:@"networkInterface"]];
    return self;
}
 @end
@implementation HgSpec
-(id) initWithScheme:(NSString*) scheme
      host:(NSString*)host
      port:(NSNumber*)port
      path:(NSString*)path
      httpHeader:(NSArray<HhSpec*>*)httpHeader { 
     self.scheme = scheme;               
     self.host = host;               
     self.port = port;               
     self.path = path;               
     self.httpHeader = httpHeader;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self scheme])
    {
        [result setValue:[self scheme] forKey:@"scheme"];
    }
    if([self host])
    {
        [result setValue:[self host] forKey:@"host"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self path])
    {
        [result setValue:[self path] forKey:@"path"];
    }
    if([self httpHeader])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self httpHeader] count]; i++) {
            HhSpec* item = [[self httpHeader] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"httpHeader"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.scheme = [dictionary objectForKey:@"scheme"];
    self.host = [dictionary objectForKey:@"host"];
    self.port = [dictionary objectForKey:@"port"];
    self.path = [dictionary objectForKey:@"path"];
    NSArray* httpHeaderArray = [dictionary objectForKey:@"httpHeader"];
    if(httpHeaderArray&&![httpHeaderArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [httpHeaderArray count];i++)
        {
            HhSpec* item = [[HhSpec alloc]initWithDic:[httpHeaderArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.httpHeader = propertyArray;
    }
    return self;
}
 @end
@implementation VolumeSpec
-(id) initWithName:(NSString*) name
      jdcloudDisk:(JDCloudVolumeSourceSpec*)jdcloudDisk { 
     self.name = name;               
     self.jdcloudDisk = jdcloudDisk;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self jdcloudDisk])
    {
        [result setValue:[[self jdcloudDisk] dictionary]forKey:@"jdcloudDisk"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.jdcloudDisk = [[JDCloudVolumeSourceSpec alloc]initWithDic:[dictionary objectForKey:@"jdcloudDisk"]];
    return self;
}
 @end
@implementation ElasticIpSpec
-(id) initWithBandwidthMbps:(NSNumber*) bandwidthMbps
      provider:(NSString*)provider
      chargeSpec:(ChargeSpec*)chargeSpec { 
     self.bandwidthMbps = bandwidthMbps;               
     self.provider = provider;               
     self.chargeSpec = chargeSpec;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self bandwidthMbps])
    {
        [result setValue:[self bandwidthMbps] forKey:@"bandwidthMbps"];
    }
    if([self provider])
    {
        [result setValue:[self provider] forKey:@"provider"];
    }
    if([self chargeSpec])
    {
        [result setValue:[[self chargeSpec] dictionary]forKey:@"chargeSpec"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.bandwidthMbps = [dictionary objectForKey:@"bandwidthMbps"];
    self.provider = [dictionary objectForKey:@"provider"];
    self.chargeSpec = [[ChargeSpec alloc]initWithDic:[dictionary objectForKey:@"chargeSpec"]];
    return self;
}
 @end
@implementation ProbeSpec
-(id) initWithInitialDelaySeconds:(NSNumber*) initialDelaySeconds
      periodSeconds:(NSNumber*)periodSeconds
      timeoutSeconds:(NSNumber*)timeoutSeconds
      failureThreshold:(NSNumber*)failureThreshold
      successThreshold:(NSNumber*)successThreshold
      exec:(ExecSpec*)exec
      httpGet:(HgSpec*)httpGet
      tcpSocket:(TcpSocketSpec*)tcpSocket { 
     self.initialDelaySeconds = initialDelaySeconds;               
     self.periodSeconds = periodSeconds;               
     self.timeoutSeconds = timeoutSeconds;               
     self.failureThreshold = failureThreshold;               
     self.successThreshold = successThreshold;               
     self.exec = exec;               
     self.httpGet = httpGet;               
     self.tcpSocket = tcpSocket;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self initialDelaySeconds])
    {
        [result setValue:[self initialDelaySeconds] forKey:@"initialDelaySeconds"];
    }
    if([self periodSeconds])
    {
        [result setValue:[self periodSeconds] forKey:@"periodSeconds"];
    }
    if([self timeoutSeconds])
    {
        [result setValue:[self timeoutSeconds] forKey:@"timeoutSeconds"];
    }
    if([self failureThreshold])
    {
        [result setValue:[self failureThreshold] forKey:@"failureThreshold"];
    }
    if([self successThreshold])
    {
        [result setValue:[self successThreshold] forKey:@"successThreshold"];
    }
    if([self exec])
    {
        [result setValue:[[self exec] dictionary]forKey:@"exec"];
    }
    if([self httpGet])
    {
        [result setValue:[[self httpGet] dictionary]forKey:@"httpGet"];
    }
    if([self tcpSocket])
    {
        [result setValue:[[self tcpSocket] dictionary]forKey:@"tcpSocket"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.initialDelaySeconds = [dictionary objectForKey:@"initialDelaySeconds"];
    self.periodSeconds = [dictionary objectForKey:@"periodSeconds"];
    self.timeoutSeconds = [dictionary objectForKey:@"timeoutSeconds"];
    self.failureThreshold = [dictionary objectForKey:@"failureThreshold"];
    self.successThreshold = [dictionary objectForKey:@"successThreshold"];
    self.exec = [[ExecSpec alloc]initWithDic:[dictionary objectForKey:@"exec"]];
    self.httpGet = [[HgSpec alloc]initWithDic:[dictionary objectForKey:@"httpGet"]];
    self.tcpSocket = [[TcpSocketSpec alloc]initWithDic:[dictionary objectForKey:@"tcpSocket"]];
    return self;
}
 @end
@implementation NetworkInterfaceAttachment
-(id) initWithAutoDelete:(NSNumber*) autoDelete
      deviceIndex:(NSNumber*)deviceIndex
      attachStatus:(NSString*)attachStatus
      attachTime:(NSString*)attachTime
      networkInterface:(InstanceNetworkInterface*)networkInterface { 
     self.autoDelete = autoDelete;               
     self.deviceIndex = deviceIndex;               
     self.attachStatus = attachStatus;               
     self.attachTime = attachTime;               
     self.networkInterface = networkInterface;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self autoDelete])
    {
        [result setValue:[self autoDelete] forKey:@"autoDelete"];
    }
    if([self deviceIndex])
    {
        [result setValue:[self deviceIndex] forKey:@"deviceIndex"];
    }
    if([self attachStatus])
    {
        [result setValue:[self attachStatus] forKey:@"attachStatus"];
    }
    if([self attachTime])
    {
        [result setValue:[self attachTime] forKey:@"attachTime"];
    }
    if([self networkInterface])
    {
        [result setValue:[[self networkInterface] dictionary]forKey:@"networkInterface"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.autoDelete = [dictionary objectForKey:@"autoDelete"];
    self.deviceIndex = [dictionary objectForKey:@"deviceIndex"];
    self.attachStatus = [dictionary objectForKey:@"attachStatus"];
    self.attachTime = [dictionary objectForKey:@"attachTime"];
    self.networkInterface = [[InstanceNetworkInterface alloc]initWithDic:[dictionary objectForKey:@"networkInterface"]];
    return self;
}
 @end
@implementation PodStatus
-(id) initWithPhase:(NSString*) phase
      reason:(NSString*)reason
      message:(NSString*)message
      podIP:(NSString*)podIP
      conditions:(NSArray<PodCondition*>*)conditions
      startTime:(NSString*)startTime { 
     self.phase = phase;               
     self.reason = reason;               
     self.message = message;               
     self.podIP = podIP;               
     self.conditions = conditions;               
     self.startTime = startTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self phase])
    {
        [result setValue:[self phase] forKey:@"phase"];
    }
    if([self reason])
    {
        [result setValue:[self reason] forKey:@"reason"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    if([self podIP])
    {
        [result setValue:[self podIP] forKey:@"podIP"];
    }
    if([self conditions])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self conditions] count]; i++) {
            PodCondition* item = [[self conditions] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"conditions"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.phase = [dictionary objectForKey:@"phase"];
    self.reason = [dictionary objectForKey:@"reason"];
    self.message = [dictionary objectForKey:@"message"];
    self.podIP = [dictionary objectForKey:@"podIP"];
    NSArray* conditionsArray = [dictionary objectForKey:@"conditions"];
    if(conditionsArray&&![conditionsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [conditionsArray count];i++)
        {
            PodCondition* item = [[PodCondition alloc]initWithDic:[conditionsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.conditions = propertyArray;
    }
    self.startTime = [dictionary objectForKey:@"startTime"];
    return self;
}
 @end
@implementation ContainerResourceSpec
-(id) initWithName:(NSString*) name
      resources:(ResourceRequestsSpec*)resources { 
     self.name = name;               
     self.resources = resources;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self resources])
    {
        [result setValue:[[self resources] dictionary]forKey:@"resources"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.resources = [[ResourceRequestsSpec alloc]initWithDic:[dictionary objectForKey:@"resources"]];
    return self;
}
 @end
@implementation Hg
-(id) initWithScheme:(NSString*) scheme
      host:(NSString*)host
      port:(NSNumber*)port
      path:(NSString*)path
      httpHeader:(NSArray<Hh*>*)httpHeader { 
     self.scheme = scheme;               
     self.host = host;               
     self.port = port;               
     self.path = path;               
     self.httpHeader = httpHeader;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self scheme])
    {
        [result setValue:[self scheme] forKey:@"scheme"];
    }
    if([self host])
    {
        [result setValue:[self host] forKey:@"host"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self path])
    {
        [result setValue:[self path] forKey:@"path"];
    }
    if([self httpHeader])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self httpHeader] count]; i++) {
            Hh* item = [[self httpHeader] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"httpHeader"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.scheme = [dictionary objectForKey:@"scheme"];
    self.host = [dictionary objectForKey:@"host"];
    self.port = [dictionary objectForKey:@"port"];
    self.path = [dictionary objectForKey:@"path"];
    NSArray* httpHeaderArray = [dictionary objectForKey:@"httpHeader"];
    if(httpHeaderArray&&![httpHeaderArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [httpHeaderArray count];i++)
        {
            Hh* item = [[Hh alloc]initWithDic:[httpHeaderArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.httpHeader = propertyArray;
    }
    return self;
}
 @end
@implementation Probe
-(id) initWithInitialDelaySeconds:(NSNumber*) initialDelaySeconds
      periodSeconds:(NSNumber*)periodSeconds
      timeoutSeconds:(NSNumber*)timeoutSeconds
      failureThreshold:(NSNumber*)failureThreshold
      successThreshold:(NSNumber*)successThreshold
      exec:(Exec*)exec
      httpGet:(Hg*)httpGet
      tcpSocket:(TcpSocket*)tcpSocket { 
     self.initialDelaySeconds = initialDelaySeconds;               
     self.periodSeconds = periodSeconds;               
     self.timeoutSeconds = timeoutSeconds;               
     self.failureThreshold = failureThreshold;               
     self.successThreshold = successThreshold;               
     self.exec = exec;               
     self.httpGet = httpGet;               
     self.tcpSocket = tcpSocket;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self initialDelaySeconds])
    {
        [result setValue:[self initialDelaySeconds] forKey:@"initialDelaySeconds"];
    }
    if([self periodSeconds])
    {
        [result setValue:[self periodSeconds] forKey:@"periodSeconds"];
    }
    if([self timeoutSeconds])
    {
        [result setValue:[self timeoutSeconds] forKey:@"timeoutSeconds"];
    }
    if([self failureThreshold])
    {
        [result setValue:[self failureThreshold] forKey:@"failureThreshold"];
    }
    if([self successThreshold])
    {
        [result setValue:[self successThreshold] forKey:@"successThreshold"];
    }
    if([self exec])
    {
        [result setValue:[[self exec] dictionary]forKey:@"exec"];
    }
    if([self httpGet])
    {
        [result setValue:[[self httpGet] dictionary]forKey:@"httpGet"];
    }
    if([self tcpSocket])
    {
        [result setValue:[[self tcpSocket] dictionary]forKey:@"tcpSocket"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.initialDelaySeconds = [dictionary objectForKey:@"initialDelaySeconds"];
    self.periodSeconds = [dictionary objectForKey:@"periodSeconds"];
    self.timeoutSeconds = [dictionary objectForKey:@"timeoutSeconds"];
    self.failureThreshold = [dictionary objectForKey:@"failureThreshold"];
    self.successThreshold = [dictionary objectForKey:@"successThreshold"];
    self.exec = [[Exec alloc]initWithDic:[dictionary objectForKey:@"exec"]];
    self.httpGet = [[Hg alloc]initWithDic:[dictionary objectForKey:@"httpGet"]];
    self.tcpSocket = [[TcpSocket alloc]initWithDic:[dictionary objectForKey:@"tcpSocket"]];
    return self;
}
 @end
@implementation ContainerState
-(id) initWithRunning:(ContainerStateRunning*) running
      terminated:(ContainerStateTerminated*)terminated
      waiting:(ContainerStateWaiting*)waiting { 
     self.running = running;               
     self.terminated = terminated;               
     self.waiting = waiting;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self running])
    {
        [result setValue:[[self running] dictionary]forKey:@"running"];
    }
    if([self terminated])
    {
        [result setValue:[[self terminated] dictionary]forKey:@"terminated"];
    }
    if([self waiting])
    {
        [result setValue:[[self waiting] dictionary]forKey:@"waiting"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.running = [[ContainerStateRunning alloc]initWithDic:[dictionary objectForKey:@"running"]];
    self.terminated = [[ContainerStateTerminated alloc]initWithDic:[dictionary objectForKey:@"terminated"]];
    self.waiting = [[ContainerStateWaiting alloc]initWithDic:[dictionary objectForKey:@"waiting"]];
    return self;
}
 @end
@implementation ContainerStatus
-(id) initWithName:(NSString*) name
      restartCount:(NSNumber*)restartCount
      ready:(NSNumber*)ready
      state:(ContainerState*)state
      lastState:(ContainerState*)lastState { 
     self.name = name;               
     self.restartCount = restartCount;               
     self.ready = ready;               
     self.state = state;               
     self.lastState = lastState;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self restartCount])
    {
        [result setValue:[self restartCount] forKey:@"restartCount"];
    }
    if([self ready])
    {
        [result setValue:[self ready] forKey:@"ready"];
    }
    if([self state])
    {
        [result setValue:[[self state] dictionary]forKey:@"state"];
    }
    if([self lastState])
    {
        [result setValue:[[self lastState] dictionary]forKey:@"lastState"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.restartCount = [dictionary objectForKey:@"restartCount"];
    self.ready = [dictionary objectForKey:@"ready"];
    self.state = [[ContainerState alloc]initWithDic:[dictionary objectForKey:@"state"]];
    self.lastState = [[ContainerState alloc]initWithDic:[dictionary objectForKey:@"lastState"]];
    return self;
}
 @end
@implementation Container
-(id) initWithName:(NSString*) name
      command:(NSArray<NSString*>*)command
      args:(NSArray<NSString*>*)args
      env:(NSArray<Env*>*)env
      image:(NSString*)image
      secret:(NSString*)secret
      tty:(NSNumber*)tty
      workingDir:(NSString*)workingDir
      livenessProbe:(Probe*)livenessProbe
      readinessProbe:(Probe*)readinessProbe
      resources:(ResourceRequests*)resources
      systemDisk:(CloudDisk*)systemDisk
      volumeMounts:(NSArray<VolumeMount*>*)volumeMounts
      containerStatus:(ContainerStatus*)containerStatus { 
     self.name = name;               
     self.command = command;               
     self.args = args;               
     self.env = env;               
     self.image = image;               
     self.secret = secret;               
     self.tty = tty;               
     self.workingDir = workingDir;               
     self.livenessProbe = livenessProbe;               
     self.readinessProbe = readinessProbe;               
     self.resources = resources;               
     self.systemDisk = systemDisk;               
     self.volumeMounts = volumeMounts;               
     self.containerStatus = containerStatus;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self command])
    {
        [result setValue:[self command] forKey:@"command"];
    }
    if([self args])
    {
        [result setValue:[self args] forKey:@"args"];
    }
    if([self env])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self env] count]; i++) {
            Env* item = [[self env] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"env"];
    }
    if([self image])
    {
        [result setValue:[self image] forKey:@"image"];
    }
    if([self secret])
    {
        [result setValue:[self secret] forKey:@"secret"];
    }
    if([self tty])
    {
        [result setValue:[self tty] forKey:@"tty"];
    }
    if([self workingDir])
    {
        [result setValue:[self workingDir] forKey:@"workingDir"];
    }
    if([self livenessProbe])
    {
        [result setValue:[[self livenessProbe] dictionary]forKey:@"livenessProbe"];
    }
    if([self readinessProbe])
    {
        [result setValue:[[self readinessProbe] dictionary]forKey:@"readinessProbe"];
    }
    if([self resources])
    {
        [result setValue:[[self resources] dictionary]forKey:@"resources"];
    }
    if([self systemDisk])
    {
        [result setValue:[[self systemDisk] dictionary]forKey:@"systemDisk"];
    }
    if([self volumeMounts])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self volumeMounts] count]; i++) {
            VolumeMount* item = [[self volumeMounts] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"volumeMounts"];
    }
    if([self containerStatus])
    {
        [result setValue:[[self containerStatus] dictionary]forKey:@"containerStatus"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.command = [dictionary objectForKey:@"command"];
    self.args = [dictionary objectForKey:@"args"];
    NSArray* envArray = [dictionary objectForKey:@"env"];
    if(envArray&&![envArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [envArray count];i++)
        {
            Env* item = [[Env alloc]initWithDic:[envArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.env = propertyArray;
    }
    self.image = [dictionary objectForKey:@"image"];
    self.secret = [dictionary objectForKey:@"secret"];
    self.tty = [dictionary objectForKey:@"tty"];
    self.workingDir = [dictionary objectForKey:@"workingDir"];
    self.livenessProbe = [[Probe alloc]initWithDic:[dictionary objectForKey:@"livenessProbe"]];
    self.readinessProbe = [[Probe alloc]initWithDic:[dictionary objectForKey:@"readinessProbe"]];
    self.resources = [[ResourceRequests alloc]initWithDic:[dictionary objectForKey:@"resources"]];
    self.systemDisk = [[CloudDisk alloc]initWithDic:[dictionary objectForKey:@"systemDisk"]];
    NSArray* volumeMountsArray = [dictionary objectForKey:@"volumeMounts"];
    if(volumeMountsArray&&![volumeMountsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [volumeMountsArray count];i++)
        {
            VolumeMount* item = [[VolumeMount alloc]initWithDic:[volumeMountsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.volumeMounts = propertyArray;
    }
    self.containerStatus = [[ContainerStatus alloc]initWithDic:[dictionary objectForKey:@"containerStatus"]];
    return self;
}
 @end
@implementation DnsConfig
-(id) initWithNameservers:(NSArray<NSString*>*) nameservers
      searches:(NSArray<NSString*>*)searches
      options:(NSArray<PodDnsConfigOption*>*)options { 
     self.nameservers = nameservers;               
     self.searches = searches;               
     self.options = options;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self nameservers])
    {
        [result setValue:[self nameservers] forKey:@"nameservers"];
    }
    if([self searches])
    {
        [result setValue:[self searches] forKey:@"searches"];
    }
    if([self options])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self options] count]; i++) {
            PodDnsConfigOption* item = [[self options] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"options"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.nameservers = [dictionary objectForKey:@"nameservers"];
    self.searches = [dictionary objectForKey:@"searches"];
    NSArray* optionsArray = [dictionary objectForKey:@"options"];
    if(optionsArray&&![optionsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [optionsArray count];i++)
        {
            PodDnsConfigOption* item = [[PodDnsConfigOption alloc]initWithDic:[optionsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.options = propertyArray;
    }
    return self;
}
 @end
@implementation Secret
-(id) initWithName:(NSString*) name
      type:(NSString*)type
      createdAt:(NSString*)createdAt
      data:(DockerRegistryData*)data { 
     self.name = name;               
     self.type = type;               
     self.createdAt = createdAt;               
     self.data = data;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self createdAt])
    {
        [result setValue:[self createdAt] forKey:@"createdAt"];
    }
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.type = [dictionary objectForKey:@"type"];
    self.createdAt = [dictionary objectForKey:@"createdAt"];
    self.data = [[DockerRegistryData alloc]initWithDic:[dictionary objectForKey:@"data"]];
    return self;
}
 @end
@implementation Pod
-(id) initWithPodId:(NSString*) podId
      name:(NSString*)name
      descriptionValue:(NSString*)descriptionValue
      az:(NSString*)az
      hostname:(NSString*)hostname
      instanceType:(NSString*)instanceType
      restartPolicy:(NSString*)restartPolicy
      terminationGracePeriodSeconds:(NSNumber*)terminationGracePeriodSeconds
      vpcId:(NSString*)vpcId
      subnetId:(NSString*)subnetId
      privateIpAddress:(NSString*)privateIpAddress
      dnsConfig:(DnsConfig*)dnsConfig
      logConfig:(LogConfig*)logConfig
      hostAliases:(NSArray<HostAlias*>*)hostAliases
      volumes:(NSArray<Volume*>*)volumes
      containers:(NSArray<Container*>*)containers
      podStatus:(PodStatus*)podStatus
      elasticIp:(ElasticIp*)elasticIp
      primaryNetworkInterface:(NetworkInterfaceAttachment*)primaryNetworkInterface
      tags:(NSArray<Tag*>*)tags
      charge:(Charge*)charge
      createTime:(NSString*)createTime { 
     self.podId = podId;               
     self.name = name;               
     self.descriptionValue = descriptionValue;               
     self.az = az;               
     self.hostname = hostname;               
     self.instanceType = instanceType;               
     self.restartPolicy = restartPolicy;               
     self.terminationGracePeriodSeconds = terminationGracePeriodSeconds;               
     self.vpcId = vpcId;               
     self.subnetId = subnetId;               
     self.privateIpAddress = privateIpAddress;               
     self.dnsConfig = dnsConfig;               
     self.logConfig = logConfig;               
     self.hostAliases = hostAliases;               
     self.volumes = volumes;               
     self.containers = containers;               
     self.podStatus = podStatus;               
     self.elasticIp = elasticIp;               
     self.primaryNetworkInterface = primaryNetworkInterface;               
     self.tags = tags;               
     self.charge = charge;               
     self.createTime = createTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self podId])
    {
        [result setValue:[self podId] forKey:@"podId"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self az])
    {
        [result setValue:[self az] forKey:@"az"];
    }
    if([self hostname])
    {
        [result setValue:[self hostname] forKey:@"hostname"];
    }
    if([self instanceType])
    {
        [result setValue:[self instanceType] forKey:@"instanceType"];
    }
    if([self restartPolicy])
    {
        [result setValue:[self restartPolicy] forKey:@"restartPolicy"];
    }
    if([self terminationGracePeriodSeconds])
    {
        [result setValue:[self terminationGracePeriodSeconds] forKey:@"terminationGracePeriodSeconds"];
    }
    if([self vpcId])
    {
        [result setValue:[self vpcId] forKey:@"vpcId"];
    }
    if([self subnetId])
    {
        [result setValue:[self subnetId] forKey:@"subnetId"];
    }
    if([self privateIpAddress])
    {
        [result setValue:[self privateIpAddress] forKey:@"privateIpAddress"];
    }
    if([self dnsConfig])
    {
        [result setValue:[[self dnsConfig] dictionary]forKey:@"dnsConfig"];
    }
    if([self logConfig])
    {
        [result setValue:[[self logConfig] dictionary]forKey:@"logConfig"];
    }
    if([self hostAliases])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self hostAliases] count]; i++) {
            HostAlias* item = [[self hostAliases] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"hostAliases"];
    }
    if([self volumes])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self volumes] count]; i++) {
            Volume* item = [[self volumes] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"volumes"];
    }
    if([self containers])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self containers] count]; i++) {
            Container* item = [[self containers] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"containers"];
    }
    if([self podStatus])
    {
        [result setValue:[[self podStatus] dictionary]forKey:@"podStatus"];
    }
    if([self elasticIp])
    {
        [result setValue:[[self elasticIp] dictionary]forKey:@"elasticIp"];
    }
    if([self primaryNetworkInterface])
    {
        [result setValue:[[self primaryNetworkInterface] dictionary]forKey:@"primaryNetworkInterface"];
    }
    if([self tags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tags] count]; i++) {
            Tag* item = [[self tags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tags"];
    }
    if([self charge])
    {
        [result setValue:[[self charge] dictionary]forKey:@"charge"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.podId = [dictionary objectForKey:@"podId"];
    self.name = [dictionary objectForKey:@"name"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.az = [dictionary objectForKey:@"az"];
    self.hostname = [dictionary objectForKey:@"hostname"];
    self.instanceType = [dictionary objectForKey:@"instanceType"];
    self.restartPolicy = [dictionary objectForKey:@"restartPolicy"];
    self.terminationGracePeriodSeconds = [dictionary objectForKey:@"terminationGracePeriodSeconds"];
    self.vpcId = [dictionary objectForKey:@"vpcId"];
    self.subnetId = [dictionary objectForKey:@"subnetId"];
    self.privateIpAddress = [dictionary objectForKey:@"privateIpAddress"];
    self.dnsConfig = [[DnsConfig alloc]initWithDic:[dictionary objectForKey:@"dnsConfig"]];
    self.logConfig = [[LogConfig alloc]initWithDic:[dictionary objectForKey:@"logConfig"]];
    NSArray* hostAliasesArray = [dictionary objectForKey:@"hostAliases"];
    if(hostAliasesArray&&![hostAliasesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [hostAliasesArray count];i++)
        {
            HostAlias* item = [[HostAlias alloc]initWithDic:[hostAliasesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.hostAliases = propertyArray;
    }
    NSArray* volumesArray = [dictionary objectForKey:@"volumes"];
    if(volumesArray&&![volumesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [volumesArray count];i++)
        {
            Volume* item = [[Volume alloc]initWithDic:[volumesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.volumes = propertyArray;
    }
    NSArray* containersArray = [dictionary objectForKey:@"containers"];
    if(containersArray&&![containersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [containersArray count];i++)
        {
            Container* item = [[Container alloc]initWithDic:[containersArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.containers = propertyArray;
    }
    self.podStatus = [[PodStatus alloc]initWithDic:[dictionary objectForKey:@"podStatus"]];
    self.elasticIp = [[ElasticIp alloc]initWithDic:[dictionary objectForKey:@"elasticIp"]];
    self.primaryNetworkInterface = [[NetworkInterfaceAttachment alloc]initWithDic:[dictionary objectForKey:@"primaryNetworkInterface"]];
    NSArray* tagsArray = [dictionary objectForKey:@"tags"];
    if(tagsArray&&![tagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsArray count];i++)
        {
            Tag* item = [[Tag alloc]initWithDic:[tagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tags = propertyArray;
    }
    self.charge = [[Charge alloc]initWithDic:[dictionary objectForKey:@"charge"]];
    self.createTime = [dictionary objectForKey:@"createTime"];
    return self;
}
 @end
@implementation RebuildContainerSpec
-(id) initWithName:(NSString*) name
      command:(NSArray<NSString*>*)command
      args:(NSArray<NSString*>*)args
      env:(NSArray<EnvSpec*>*)env
      image:(NSString*)image
      secret:(NSString*)secret
      tty:(NSNumber*)tty
      workingDir:(NSString*)workingDir
      livenessProbe:(ProbeSpec*)livenessProbe
      readinessProbe:(ProbeSpec*)readinessProbe
      volumeMounts:(NSArray<VolumeMountSpec*>*)volumeMounts { 
     self.name = name;               
     self.command = command;               
     self.args = args;               
     self.env = env;               
     self.image = image;               
     self.secret = secret;               
     self.tty = tty;               
     self.workingDir = workingDir;               
     self.livenessProbe = livenessProbe;               
     self.readinessProbe = readinessProbe;               
     self.volumeMounts = volumeMounts;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self command])
    {
        [result setValue:[self command] forKey:@"command"];
    }
    if([self args])
    {
        [result setValue:[self args] forKey:@"args"];
    }
    if([self env])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self env] count]; i++) {
            EnvSpec* item = [[self env] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"env"];
    }
    if([self image])
    {
        [result setValue:[self image] forKey:@"image"];
    }
    if([self secret])
    {
        [result setValue:[self secret] forKey:@"secret"];
    }
    if([self tty])
    {
        [result setValue:[self tty] forKey:@"tty"];
    }
    if([self workingDir])
    {
        [result setValue:[self workingDir] forKey:@"workingDir"];
    }
    if([self livenessProbe])
    {
        [result setValue:[[self livenessProbe] dictionary]forKey:@"livenessProbe"];
    }
    if([self readinessProbe])
    {
        [result setValue:[[self readinessProbe] dictionary]forKey:@"readinessProbe"];
    }
    if([self volumeMounts])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self volumeMounts] count]; i++) {
            VolumeMountSpec* item = [[self volumeMounts] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"volumeMounts"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.command = [dictionary objectForKey:@"command"];
    self.args = [dictionary objectForKey:@"args"];
    NSArray* envArray = [dictionary objectForKey:@"env"];
    if(envArray&&![envArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [envArray count];i++)
        {
            EnvSpec* item = [[EnvSpec alloc]initWithDic:[envArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.env = propertyArray;
    }
    self.image = [dictionary objectForKey:@"image"];
    self.secret = [dictionary objectForKey:@"secret"];
    self.tty = [dictionary objectForKey:@"tty"];
    self.workingDir = [dictionary objectForKey:@"workingDir"];
    self.livenessProbe = [[ProbeSpec alloc]initWithDic:[dictionary objectForKey:@"livenessProbe"]];
    self.readinessProbe = [[ProbeSpec alloc]initWithDic:[dictionary objectForKey:@"readinessProbe"]];
    NSArray* volumeMountsArray = [dictionary objectForKey:@"volumeMounts"];
    if(volumeMountsArray&&![volumeMountsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [volumeMountsArray count];i++)
        {
            VolumeMountSpec* item = [[VolumeMountSpec alloc]initWithDic:[volumeMountsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.volumeMounts = propertyArray;
    }
    return self;
}
 @end
@implementation ContainerSpec
-(id) initWithName:(NSString*) name
      command:(NSArray<NSString*>*)command
      args:(NSArray<NSString*>*)args
      env:(NSArray<EnvSpec*>*)env
      image:(NSString*)image
      secret:(NSString*)secret
      tty:(NSNumber*)tty
      workingDir:(NSString*)workingDir
      livenessProbe:(ProbeSpec*)livenessProbe
      readinessProbe:(ProbeSpec*)readinessProbe
      resources:(ResourceRequestsSpec*)resources
      systemDisk:(CloudDiskSpec*)systemDisk
      volumeMounts:(NSArray<VolumeMountSpec*>*)volumeMounts { 
     self.name = name;               
     self.command = command;               
     self.args = args;               
     self.env = env;               
     self.image = image;               
     self.secret = secret;               
     self.tty = tty;               
     self.workingDir = workingDir;               
     self.livenessProbe = livenessProbe;               
     self.readinessProbe = readinessProbe;               
     self.resources = resources;               
     self.systemDisk = systemDisk;               
     self.volumeMounts = volumeMounts;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self command])
    {
        [result setValue:[self command] forKey:@"command"];
    }
    if([self args])
    {
        [result setValue:[self args] forKey:@"args"];
    }
    if([self env])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self env] count]; i++) {
            EnvSpec* item = [[self env] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"env"];
    }
    if([self image])
    {
        [result setValue:[self image] forKey:@"image"];
    }
    if([self secret])
    {
        [result setValue:[self secret] forKey:@"secret"];
    }
    if([self tty])
    {
        [result setValue:[self tty] forKey:@"tty"];
    }
    if([self workingDir])
    {
        [result setValue:[self workingDir] forKey:@"workingDir"];
    }
    if([self livenessProbe])
    {
        [result setValue:[[self livenessProbe] dictionary]forKey:@"livenessProbe"];
    }
    if([self readinessProbe])
    {
        [result setValue:[[self readinessProbe] dictionary]forKey:@"readinessProbe"];
    }
    if([self resources])
    {
        [result setValue:[[self resources] dictionary]forKey:@"resources"];
    }
    if([self systemDisk])
    {
        [result setValue:[[self systemDisk] dictionary]forKey:@"systemDisk"];
    }
    if([self volumeMounts])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self volumeMounts] count]; i++) {
            VolumeMountSpec* item = [[self volumeMounts] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"volumeMounts"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.command = [dictionary objectForKey:@"command"];
    self.args = [dictionary objectForKey:@"args"];
    NSArray* envArray = [dictionary objectForKey:@"env"];
    if(envArray&&![envArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [envArray count];i++)
        {
            EnvSpec* item = [[EnvSpec alloc]initWithDic:[envArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.env = propertyArray;
    }
    self.image = [dictionary objectForKey:@"image"];
    self.secret = [dictionary objectForKey:@"secret"];
    self.tty = [dictionary objectForKey:@"tty"];
    self.workingDir = [dictionary objectForKey:@"workingDir"];
    self.livenessProbe = [[ProbeSpec alloc]initWithDic:[dictionary objectForKey:@"livenessProbe"]];
    self.readinessProbe = [[ProbeSpec alloc]initWithDic:[dictionary objectForKey:@"readinessProbe"]];
    self.resources = [[ResourceRequestsSpec alloc]initWithDic:[dictionary objectForKey:@"resources"]];
    self.systemDisk = [[CloudDiskSpec alloc]initWithDic:[dictionary objectForKey:@"systemDisk"]];
    NSArray* volumeMountsArray = [dictionary objectForKey:@"volumeMounts"];
    if(volumeMountsArray&&![volumeMountsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [volumeMountsArray count];i++)
        {
            VolumeMountSpec* item = [[VolumeMountSpec alloc]initWithDic:[volumeMountsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.volumeMounts = propertyArray;
    }
    return self;
}
 @end
@implementation PodSpec
-(id) initWithName:(NSString*) name
      descriptionValue:(NSString*)descriptionValue
      hostname:(NSString*)hostname
      restartPolicy:(NSString*)restartPolicy
      terminationGracePeriodSeconds:(NSNumber*)terminationGracePeriodSeconds
      instanceType:(NSString*)instanceType
      az:(NSString*)az
      dnsConfig:(DnsConfigSpec*)dnsConfig
      logConfig:(LogConfigSpec*)logConfig
      hostAliases:(NSArray<HostAliasSpec*>*)hostAliases
      volumes:(NSArray<VolumeSpec*>*)volumes
      containers:(NSArray<ContainerSpec*>*)containers
      charge:(ChargeSpec*)charge
      elasticIp:(ElasticIpSpec*)elasticIp
      primaryNetworkInterface:(NetworkInterfaceAttachmentSpec*)primaryNetworkInterface { 
     self.name = name;               
     self.descriptionValue = descriptionValue;               
     self.hostname = hostname;               
     self.restartPolicy = restartPolicy;               
     self.terminationGracePeriodSeconds = terminationGracePeriodSeconds;               
     self.instanceType = instanceType;               
     self.az = az;               
     self.dnsConfig = dnsConfig;               
     self.logConfig = logConfig;               
     self.hostAliases = hostAliases;               
     self.volumes = volumes;               
     self.containers = containers;               
     self.charge = charge;               
     self.elasticIp = elasticIp;               
     self.primaryNetworkInterface = primaryNetworkInterface;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self hostname])
    {
        [result setValue:[self hostname] forKey:@"hostname"];
    }
    if([self restartPolicy])
    {
        [result setValue:[self restartPolicy] forKey:@"restartPolicy"];
    }
    if([self terminationGracePeriodSeconds])
    {
        [result setValue:[self terminationGracePeriodSeconds] forKey:@"terminationGracePeriodSeconds"];
    }
    if([self instanceType])
    {
        [result setValue:[self instanceType] forKey:@"instanceType"];
    }
    if([self az])
    {
        [result setValue:[self az] forKey:@"az"];
    }
    if([self dnsConfig])
    {
        [result setValue:[[self dnsConfig] dictionary]forKey:@"dnsConfig"];
    }
    if([self logConfig])
    {
        [result setValue:[[self logConfig] dictionary]forKey:@"logConfig"];
    }
    if([self hostAliases])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self hostAliases] count]; i++) {
            HostAliasSpec* item = [[self hostAliases] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"hostAliases"];
    }
    if([self volumes])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self volumes] count]; i++) {
            VolumeSpec* item = [[self volumes] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"volumes"];
    }
    if([self containers])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self containers] count]; i++) {
            ContainerSpec* item = [[self containers] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"containers"];
    }
    if([self charge])
    {
        [result setValue:[[self charge] dictionary]forKey:@"charge"];
    }
    if([self elasticIp])
    {
        [result setValue:[[self elasticIp] dictionary]forKey:@"elasticIp"];
    }
    if([self primaryNetworkInterface])
    {
        [result setValue:[[self primaryNetworkInterface] dictionary]forKey:@"primaryNetworkInterface"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.hostname = [dictionary objectForKey:@"hostname"];
    self.restartPolicy = [dictionary objectForKey:@"restartPolicy"];
    self.terminationGracePeriodSeconds = [dictionary objectForKey:@"terminationGracePeriodSeconds"];
    self.instanceType = [dictionary objectForKey:@"instanceType"];
    self.az = [dictionary objectForKey:@"az"];
    self.dnsConfig = [[DnsConfigSpec alloc]initWithDic:[dictionary objectForKey:@"dnsConfig"]];
    self.logConfig = [[LogConfigSpec alloc]initWithDic:[dictionary objectForKey:@"logConfig"]];
    NSArray* hostAliasesArray = [dictionary objectForKey:@"hostAliases"];
    if(hostAliasesArray&&![hostAliasesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [hostAliasesArray count];i++)
        {
            HostAliasSpec* item = [[HostAliasSpec alloc]initWithDic:[hostAliasesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.hostAliases = propertyArray;
    }
    NSArray* volumesArray = [dictionary objectForKey:@"volumes"];
    if(volumesArray&&![volumesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [volumesArray count];i++)
        {
            VolumeSpec* item = [[VolumeSpec alloc]initWithDic:[volumesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.volumes = propertyArray;
    }
    NSArray* containersArray = [dictionary objectForKey:@"containers"];
    if(containersArray&&![containersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [containersArray count];i++)
        {
            ContainerSpec* item = [[ContainerSpec alloc]initWithDic:[containersArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.containers = propertyArray;
    }
    self.charge = [[ChargeSpec alloc]initWithDic:[dictionary objectForKey:@"charge"]];
    self.elasticIp = [[ElasticIpSpec alloc]initWithDic:[dictionary objectForKey:@"elasticIp"]];
    self.primaryNetworkInterface = [[NetworkInterfaceAttachmentSpec alloc]initWithDic:[dictionary objectForKey:@"primaryNetworkInterface"]];
    return self;
}
 @end
 
 


